package com.alphas.xixibackendalphas.exception;

import com.alphas.xixibackendalphas.common.StatusCode;

public class BusinessException extends RuntimeException {
    /**
     * 状态码
     */
    private StatusCode statusCode;

    private String description;

    public BusinessException(StatusCode statusCode,String description) {
        this.statusCode = statusCode;
        this.description = description;
    }

    public BusinessException(StatusCode statusCode) {
        this.statusCode = statusCode;
        this.description = statusCode.getDescription();
    }

    public StatusCode getStatusCode() {
        return statusCode;
    }
    public String getDescription() {
        return description;
    }
}
